package crp.core.security.domain.services;

import com.qwlabs.lang.C2;

import javax.enterprise.context.ApplicationScoped;
import java.util.List;

import static crp.core.security.domain.models.Permissions.*;

@ApplicationScoped
public class PermissionSearcher {
    private final List<String> permissions = List.of(
            CORE_CONSOLE_VIEW,
            CORE_ROLE_VIEW,
            CORE_ROLE_EDIT,
            CORE_COURSE_VIEW,
            CORE_COURSE_EDIT,
            CORE_RESOURCE_VIEW,
            CORE_RESOURCE_EDIT,
            CORE_RESOURCE_SYNC,
            CORE_RESOURCE_APPROVE,
            CORE_COURSE_APPROVE,
            PORTAL_BANNER_VIEW,
            PORTAL_BANNER_EDIT,
            PORTAL_SECTION_VIEW,
            PORTAL_SECTION_EDIT,
            PORTAL_NEWS_VIEW,
            PORTAL_NEWS_EDIT,
            AUTH_ROLES_VIEW,
            AUTH_ROLES_EDIT,
            AUTH_USERS_VIEW,
            AUTH_USERS_EDIT


    );

    public List<String> all() {
        return C2.list(permissions);
    }
}
